//
//  HMPayOrderTableViewCell.m
//  HMMarket
//
//  Created by maimaigo3 on 2017/5/18.
//  Copyright © 2017年 homai. All rights reserved.
//

#import "HMPayOrderTableViewCell.h"

@interface HMPayOrderTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *imageVI;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *weight;
@property (weak, nonatomic) IBOutlet UILabel *realityLabel;

@end

@implementation HMPayOrderTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    // Initialization code
}

- (void)setOrderDetail:(HMOrderDetail *)orderDetail {
    _orderDetail = orderDetail;
    [_imageVI sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", kImageUrl,orderDetail.logo]] placeholderImage:[UIImage imageNamed:@"Cart_placeholder"] options:SDWebImageRetryFailed|SDWebImageLowPriority];
    _nameLabel.text = orderDetail.name;
    _priceLabel.text = [NSString stringWithFormat:@"¥%@/%@", orderDetail.price, orderDetail.weight];
    _weight.text = orderDetail.item_number;
    _realityLabel.text = orderDetail.item_true_number;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
